package org.liquidByte.trafficMustang.androidApp.overlays;

import android.graphics.Bitmap;
import android.view.MotionEvent;

import com.google.android.maps.MapView;

public class SelectableOverlay extends SingleMarkerOverlay {
	public SelectableOverlay(Bitmap pushpin) {
		super(pushpin);
	}

	@Override
	public boolean onTouchEvent(MotionEvent e, MapView mapView) {
		boolean ret = super.onTouchEvent(e, mapView);
		
		if (e.getAction() == 1) {
			this.setMark(mapView.getProjection().fromPixels((int)e.getX(), (int)e.getY()));
		}
		
		return ret;
	}
}